-
Notifications
You must be signed in to change notification settings - Fork 16.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AP_SmartAudio: fix a bug that would starve the lower priority thread #19579
Conversation
… such as scripting.
@andyp1per looks like this should be included in 4.1.x updates? |
Yeah, probably. |
@MingchenZhang really good catch! |
Yes, @MingchenZhang really great work, txs for this! |
Thanks for the quick review. |
In general we first merge to master and then backport to the stable releases if the "Projects" label on the right side of this screen has been set. We've set the "Projects" to Copter, Rover, Plane-4.1 so it'll be backported in the near future. |
@rmackay9 It might be my mistake, this pr merge into Plane-4.1 directly, not to master as you suggested as the general approach. This change is missing on master. |
@MingchenZhang, ah, right again! thanks very much for that. I've just directly cherry-picked it into master. |
Issue: when using smartaudio, lua script only get to run once right after a change to the vtx setting. Usually scheduled update in lua script does not run normally.
In the original code, if the smartaudio is initialized, and no other request is issued, delay() would not be executed in the loop and lower priority thread would be starved.
Change to OR to allow thread yield when no response is expected.
roughly tested with a smartaudio enabled arduplane.